# -!- coding: utf-8 -!-
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
渠道资金新版接口,提供对外
# 文件：api_msydloan
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

import requests


headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36',

            'content-Type': 'application/json',
        }
w_url= 'http://test.canal.msxiaodai.com'

def add_clerk():
    fu_url = w_url + '/v1/channel/temp/addClerk'
    data = [{"channel":"KY",            # 渠道：鸠摩=JM、阔源=KY、华睿智投=HR
            "mobile":"13022334450",
            "name":"阔源",
            "password":"123abc"}]
    req1 = requests.post(fu_url, json=data, headers=headers)
    data = req1.text
    print("授信申请接口响应信息：%s", data)

def login():
    fu_url = w_url + '/v1/channel/common/login'
    data = {"mobile": "13022334450", "password": "123abc"}
    req1 = requests.post(fu_url, json=data, headers=headers)
    data = req1.text
    print("授信申请接口响应信息：%s", data)


if __name__ == '__main__':
    add_clerk()
    #login()